



use "${pathdata_robustness}/RobustnessExperiment3.dta", clear



/*
Treatments:

1. 3-product
2. 1-product
3. 6-product

BE CAREFUL WHEN WORKING WITH THE NORMAL TREATMENT DUMMIES
QUITE COUNTERINTUITIVE

*/

	/* Generate "new" treatment indicators
	
	1. Story: 1-product
	2. Story: 3-product
	3. Story: 6-product
	4. Statistic: 1-product
	5. Statistic: 3-product
	6. Statistic: 6-product	
	*/

	gen type2 = 1 if treatment == 2 & storyshort == 1
	replace type2 = 2 if treatment == 1 & storyshort == 1
	replace type2 = 3 if treatment == 3 & storyshort == 1
	replace type2 = 4 if treatment == 2 & storyshort == 0
	replace type2 = 5 if treatment == 1 & storyshort == 0
	replace type2 = 6 if treatment == 3 & storyshort == 0




* ########## 1-3-6 1-3-6 Average Belief movement ##########

preserve
	
	*Generate difference Delay - Immediate
	gen delta = effect_recall - effect

	collapse (mean) delta (sem) delta_sem = delta , by(type2)	 
	rename delta_sem sem0
	rename delta dev0
	gen upper=dev+sem
	gen lower=dev-sem

	tw (scatter dev type2 if type2==1, connect(l)  mcolor(ebblue*1.5)) ///
	(scatter dev type2 if type2==2, connect(l)  mcolor(ebblue*1)) ///
	(scatter dev type2 if type2==3, connect(l)  mcolor(ebblue*0.6)) ///
		(rcap upper lower type2 if type2==1, lw(medthick) lcolor(ebblue*1.5))  ///
		(rcap upper lower type2 if type2==2, lw(medthick) lcolor(ebblue*1)) ///
		(rcap upper lower type2 if type2==3, lw(medthick) lcolor(ebblue*0.6))  ///
	(scatter dev type2 if type2==4, connect(l)  mcolor(red*1.5)) ///
	(scatter dev type2 if type2==5, connect(l)  mcolor(red*1)) ///
	(scatter dev type2 if type2==6, connect(l)  mcolor(red*0.6)) ///
		(rcap upper lower type2 if type2==4, lw(medthick) lcolor(red*1.5))  ///
		(rcap upper lower type2 if type2==5, lw(medthick) lcolor(red*1)) ///
			(rcap upper lower type2 if type2==6, lw(medthick) lcolor(red*0.6)),  ///
	ytitle("Change in belief impact {c 177} SEM" "(percentage points)") ///
		xtitle(" ", ) xsc(r(0.5 6.5) lcolor(none)) ysc(r(-18 0) lcolor(none)) ///
		yline(0, lcolor(gs10) lwidth(thin)) ///
		graphregion(color(white)) title("", color(black)) ///
		ylabel(-22(2)0, tlc(none) angle(0) glcolor(gs15) glwidth(thin)) ///
		legend(off) ///
		xline(3.5, lwidth(thin) lcolor(black) lp(dash)) ///
		xlabel(1 "1-Product" 2 `" "3-Products" " " "{bf:Story}" "' 3 "6-Products" 4 "1-Product" 5 `" "3-Products" " " "{bf:Statistic}" "' 6 "6-Products" , labsize(small)) ///
			 	title("Change in belief impact from {it:Immediate} to {it:Delay}", margin(b=3) color(black)) ysize(5) xsize(10) 

		graph export "${pathout_robustness}/figures/figureA5a.pdf", replace 


restore

* ########## 1-3-6 1-3-6 Average Correct Recall ##########

preserve


	collapse (mean) correct_recall (seb) stderr = correct_recall, by (type2)

	gen h = correct_recall + stderr
	gen l = correct_recall - stderr


	tw (scatter correct_recall type2 if type2==1, mcolor(ebblue*1.5)) ///
	(scatter correct_recall type2 if type2==2, mcolor(ebblue*1)) ///
	(scatter correct_recall type2 if type2==3, mcolor(ebblue*0.6)) ///
		(rcap h l type2 if type2==1, lw(medthick) lcolor(ebblue*1.5))  ///
		(rcap h l type2 if type2==2, lw(medthick) lcolor(ebblue*1)) ///
		(rcap h l type2 if type2==3, lw(medthick) lcolor(ebblue*0.6))  ///
	(scatter correct_recall type2 if type2==4,  mcolor(red*1.5)) ///
	(scatter correct_recall type2 if type2==5,  mcolor(red*1)) ///
	(scatter correct_recall type2 if type2==6,  mcolor(red*0.6)) ///
		(rcap h l type2 if type2==4, lw(medthick) lcolor(red*1.5))  ///
		(rcap h l type2 if type2==5, lw(medthick) lcolor(red*1)) ///
			(rcap h l type2 if type2==6, lw(medthick) lcolor(red*0.6)),  ///
	ytitle(" " "Mean Rate  {c 177} SEM") ///
		xtitle(" ") xsc(r(0.5 6.5) lcolor(none)) ysc(r(0 1) lcolor(none)) ///
		yline(0, lcolor(gs10) lwidth(thin)) ///
		graphregion(color(white)) title("", color(black)) ///
		ylabel(0(0.2)1, tlc(none) angle(0) glcolor(gs15) glwidth(thin)) ///
		legend(off) ///
			 	title("Correct recall of information type and valence",  color(black)) ysize(5) xsize(10) ///
		xline(3.5, lwidth(thin) lcolor(black) lp(dash)) ///
		xlabel(1 "1-Product" 2 `" "3-Products" " " "{bf:Story}" "' 3 "6-Products" 4 "1-Product" 5 `" "3-Products" " " "{bf:Statistic}" "' 6 "6-Products" , labsize(small)) 
		graph export "${pathout_robustness}/figures/figureA5b.pdf", replace 






